Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add encrypted file system store (encrypt files at rest) #489

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

derSascha
Copy link

This pull-request adds a keystore implementation, that wraps a file system store, but encrypts the files at rest 🎉

Why is this useful?

In smaller setups, using a cloud KMS might become expensive, and a Vault setup that must be unlocked all the time complicated too.

How does it work?

The implementation combines existing things. It wraps the file system store, and encrypts the file content using a SecretKey. The encryption key must be provided in a dedicated file that contains exactly 32 bytes.

Is it secure?

Storing the encryption key around the file store does not make it secure, but storing the key in a remote location helps. You might mount a remote file system with the key via e.g. ssh or download the key via HTTPS to a temporary (in memory) directory.

Why not using file system encryption?

Encryption at rest has the nice benefit that backups of the file store are secure. Setting up file system encryption without manual unlocking on reboots might not easy to setup too.

How to use?

Create a new encryption key:

dd if=/dev/random of=/some-path/my-kes-master-key bs=32 count=1

Configure the encrypted file store:

...
keystore:
  encryptedfs:
    masterKeyPath: /tmpfs/private-download-path/kes-master-key
    masterKeyCipher: AES265
    path: /data/my-kes-file-store

This pull-request adds a new store, instead of modifying the existing file system store. This has the nice benefit that we can ensure the encryption key is set, and not missing by mistake. The configuration key is named encryptedfs and the implementation efs.

Fixes #392

@derSascha derSascha changed the title efs: add encrypted file system store Add encrypted file system store Oct 31, 2024
@derSascha derSascha changed the title Add encrypted file system store Add encrypted file system store (encrypt files at rest) Oct 31, 2024
Add a keystore implementation, that wraps a file system store, but encrypts the files.

Fixes: minio#392

Signed-off-by: Sascha Wolke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Encrypting files at rest for the filesystem target
1 participant